<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/financialfolder/Financial.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/system/financialfolder/Financial.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'FinancialAccountId',
                footer: "Foots",
                cnName: '财务记账',
                name: 'financialfolder/Financial',
                url: "/Financial/",
                sortName: "FinancialAccountId"
            });
            const editFormFields = ref({"ReceivableId":"","DealWithId":"","FinancialName":"","CategoryName":"","ReceiptPayMent":"","PayableReceivable":"","PaymentPrice":"","PaymentTime":"","OrderOrganization":""});
            const editFormOptions = ref([[{"title":"应付流水号","field":"ReceivableId"}],
                              [{"title":"应付流水号","field":"DealWithId"}],
                              [{"title":"财务记账名称","field":"FinancialName"}],
                              [{"dataKey":"FinancialCategoryId ","data":[],"title":"财务类别名称","field":"CategoryName"}],
                              [{"title":"收款方/付款方","field":"ReceiptPayMent"}],
                              [{"title":"应收/应付","field":"PayableReceivable"}],
                              [{"title":"付款金额","field":"PaymentPrice","type":"decimal"}],
                              [{"title":"付款时间","field":"PaymentTime"}],
                              [{"title":"付款机构","field":"OrderOrganization"}]]);
            const searchFormFields = ref({"FinancialAccountId":"","FinancialName":"","CategoryName":"","PaymentTime":""});
            const searchFormOptions = ref([[{"title":"流水号","field":"FinancialAccountId"},{"title":"财务记账名称","field":"FinancialName","type":"like"},{"dataKey":"FinancialCategoryId ","data":[],"title":"财务类别名称","field":"CategoryName","type":"text"}],[{"title":"付款时间","field":"PaymentTime","type":"datetime"}]]);
            const columns = ref([{field:'FinancialAccountId',title:'流水号',type:'string',sort:true,width:220,readonly:true,require:true,align:'left',sort:true},
                       {field:'FinancialName',title:'财务记账名称',type:'string',width:110,align:'left'},
                       {field:'CategoryName',title:'财务类别名称',type:'string',bind:{ key:'FinancialCategoryId ',data:[]},sort:true,width:110,align:'left'},
                       {field:'ReceiptPayMent',title:'收款方/付款方',type:'string',width:110,align:'left'},
                       {field:'PayableReceivable',title:'应收/应付',type:'string',width:110,align:'left'},
                       {field:'PaymentPrice',title:'付款金额',type:'decimal',width:110,align:'left'},
                       {field:'PaymentTime',title:'付款时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'OrderOrganization',title:'付款机构',type:'string',width:110,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
